<include file="Public/head" />

</head>
<include file="Public/common_header" />
    <div class="mian">
        <include file="Public/sidebar" menu='cwgl.lkldz' />
        <div class="mianR">
            <h3 class="yonghu">拉卡拉对账列表</h3>

            <div class="listBox">
                <div class="yuList">
                    <div class="offline">
                        <ul class="clearfix">
                          <form action="/Reconciliation/index" method="get">
                            <li><input type="text" name="start_date" placeholder="开始时间" value="{$params.start_date}" class="dealOrigination" id="demoText3" /></li>
                            <li><input type="text" name="end_date" placeholder="结束时间" value="{$params.end_date}" class="dealOrigination" id="demoText4" /></li>
                            <li class="screenBtn" style="margin-top:15px;margin-left:10px;"><input type="submit" value="筛选" /></li>
                          </form>
                        </ul>
                    </div>
                    <div class="totalConter" style="padding-top:0;">
                        <i>合计：</i>
                        记录<b id="fewPens"></b>笔
                        <em>金额结算金额</em><b id="settlement"></b>元
                        <em>手续费</em><b id="counterFee"></b>元
                    </div>
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th width="12%">日期</th>
                            <th width="14%">数量</th>
                            <th width="13%">结算金额</th>
                            <th width="16%">手续费</th>
                            <th width="11%">操作</th>

                        </tr>
                        </thead>
                        <tbody>
                            <foreach name="list" item="item">
                                <tr>
                                    <td>{$item.create_date}</td>
                                    <td>{$item.amount}</td>
                                    <td class="counterMoney">{$item.settlement_money}</td>
                                    <td class="settlementMoney">{$item.poundage}</td>
                                    <td><a href="/Reconciliation/detail?id={$item.id}">查看</a></td>
                                </tr>
                            </foreach>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="pageFaye">{$page}</div>
        </div>
    </div>
<div class="clear"></div>
<script type="text/javascript">
    $(document).ready(function() {
        /*线下合计*/
        $("#fewPens").html($(".table-bordered").eq(0).find("tbody tr").length)
        var money=0;
        var amount=$(".table-bordered tbody .rechargeAmount");
        for(var i=0;i<amount.length;i++){
            money+=parseFloat($(amount).eq(i).html());
        }
        $("#recharge").html(money);

        /*拉卡拉合计*/
        var money2=0;
        var amount2=$(".table-bordered tbody .counterMoney");
        for(var i=0;i<amount2.length;i++){
            money2+=parseFloat($(amount2).eq(i).html());
        }
        $("#settlement").html(money2);

        var money3=0;
        var amount3=$(".table-bordered tbody .settlementMoney");
        for(var i=0;i<amount3.length;i++){
            money3+=parseFloat($(amount3).eq(i).html());
        }
        $("#counterFee").html(money3);
    })
</script>
<include file="Public/foot" />